const http = require('http')

let app = http.createServer((req,res)=> {
    let obj = {
        name: '法外狂徒张三'
    }

    res.setHeader('Content-Type','text/html;charset=utf-8')
    res.write(JSON.stringify(obj))

    /* 
    res.setHeader('Content-Type','text/html;charset=utf-8')
    res.write(JSON.stringify(obj))
    res.setHeader('Content-Type','text/html;charset=utf-8')
    res.write(JSON.stringify(obj))
    */

    res.end()
})

app.listen(3000,()=> {
    console.log('server run')
})